declare var $:any;
declare var jQuery:any;
import { Component,OnInit } from '@angular/core';
import { UIRouter } from '@uirouter/angular';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
    title = 'app';
    constructor(private router: UIRouter ){}
    ngOnInit(){
        // this.router.navigate(['/home']);
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 6.4 +"px";
        //配置动画播放
        $.fn.extend({
            enter: function (animationName) {
                var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
                this.addClass('animated ' + animationName).one(animationEnd, function() {
                    $(this).removeClass('animated ' + animationName);
                });
                return this;
            },
            leave: function (animationName) {
              var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
              this.addClass('animated ' + animationName).one(animationEnd, function() {
                  $(this).removeClass('animated ' + animationName);
                  $(this).css('display','none');
              });
              return this;
            }
        });
    }
}
